/* class Iterator {
    constructor(props) {
        this.props = props

        this.index = -1
    }

    next() {
        this.index++
        let { props, index } = this
        if (index >= props.length) {
            return {
                done: true,
                value: undefined
            }
        }
        return {
            done: false,
            value: props[index]
        }
    }
}

let arr = new Iterator([1, 2, 3, 4])
console.log(arr.next());
console.log(arr.next());
console.log(arr.next());
console.log(arr.next());
console.log(arr.next()); */
let arr = new Array(9999999).fill(null)
console.time('for')
for(let i = 0;i<=arr.length;i++){

}
console.timeEnd('for')
console.time('forEach')
arr.forEach(item=>{})
console.timeEnd('forEach')
console.time('forIn')
for(let a in arr){

}
console.timeEnd('forIn')
console.time('forOf')
for(let a of arr){
    
}
console.timeEnd('forOf')
